/*
 * vrest.h
 * Copyright (C) Albert Aixendri 2010 <albertaixendri@gmail.com>
 * 
 * libvrest is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * libvrest is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 */


#include <curl/curl.h>
#include <stdlib.h>
#include <string.h>

#include <curl/curl.h>
#include <curl/types.h>
#include <curl/easy.h>

struct MemoryStruct {
  char *memory;
  size_t size;
};

struct Handle {
	CURL *curl;
	char *body;
	char *header;
};

int initHandle();
char *getBody(int handle);
char *getHeader(int handle);
void doPostHandle(int handle, char *url, char *header, char *post);
void doGetHandle(int ihandle, char *url, char *header);
void freeHandle(int);
